package DesignPatterns.Singleton;

//枚举饿汉式
public enum Singleton4 {
    //Singleton4 INSTANCE;
    INSTANCE;

    //枚举构造方法默认就是私有的，去掉也可以
    private Singleton4() {
    }

    public static Singleton4 getInstance() {
        return INSTANCE;
    }
}
